home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume6 / conquer4 / patch9 < prev   
Encoding:
Internet Message Format  |  1990-03-17  |  65.0 KB

  1. Path: uunet!zephyr.ens.tek.com!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v09i032:  conquer4 - middle earth multi-player game (V4), Patch9
  5. Message-ID: <5276@tekred.CNA.TEK.COM>
  6. Date: 5 Mar 90 16:46:28 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 1971
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: Adam Bryant <adb@cs.bu.edu>
  12. Posting-number: Volume 9, Issue 32
  13. Archive-name: conquer4/Patch9
  14. Patch-To: conquer4: Volume 6, Issue 83-96
  15.  
  16.  
  17. [[Here is the latest and hopefully last patch to conquer version 4.
  18. [But, hey, didn't I say that with patch number 8?]  Now, I hope
  19. I can finally get all my effort into version 5.
  20.  
  21. Anyway, don't have to much time to say much about it, but in summary:
  22.  
  23.   - this patch enhances god powers and fixes a number of errors
  24.     in god routines.
  25.   - this patch takes care of a number of bug fixes, most especially
  26.     the grouped troops bug.
  27.   - this patch fixes a number of bugs with the trading code thanks
  28.     to Charles C. Fu.
  29.   - I believe that this is a much cleaner version than any of the
  30.     proceeding ones... and the feel seems a bit better as well.
  31.  
  32. Enjoy,
  33. adam]]
  34.  
  35. #! /bin/sh
  36. # This is a shell archive.  Remove anything before this line, then unpack
  37. # it by saving it into a file and typing "sh file".  To overwrite existing
  38. # files, type "sh file -c".  You can also feed this as standard input via
  39. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  40. # will see the following message at the end:
  41. #        "End of shell archive."
  42. # Contents:  patches09
  43. # Wrapped by billr@saab on Mon Mar  5 08:47:55 1990
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'patches09' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'patches09'\"
  47. else
  48. echo shar: Extracting \"'patches09'\" \(62540 characters\)
  49. sed "s/^X//" >'patches09' <<'END_OF_FILE'
  50. X*** opatchlevel.h    Sat Mar  3 15:27:42 1990
  51. X--- patchlevel.h    Sat Mar  3 15:27:52 1990
  52. X***************
  53. X*** 1 ****
  54. X! #define PATCHLEVEL    8
  55. X--- 1 ----
  56. X! #define PATCHLEVEL    9
  57. X*** onotes.v4    Sat Mar  3 15:27:42 1990
  58. X--- notes.v4    Sat Mar  3 15:27:52 1990
  59. X***************
  60. X*** 314,319 ****
  61. X--- 314,383 ----
  62. X      defend mode this way; even when they had marched too far).
  63. X  255. allow recombination of troops with same status and same type
  64. X      unless the type is TRADED or ON_BOARD.
  65. X+ ===4.0 patch number eight released => 4.8 ===============================
  66. X+ 256. made sure that minor leaders lived before becoming major leaders.
  67. X+ 257. fixed major bug on not resetting status of moved grouped unit.
  68. X+ 258. set a grouped movement to be equal to the movement of the leader.
  69. X+ 259. added missing return to commands.c (1341) [Paul Waterman]
  70. X+ 260. made sure only to ask for splitting warships when warships are there.
  71. X+ 261. no longer ask to split ships that are not in fleet.
  72. X+ 262. allow god to manipulate a fleet up for trade.
  73. X+ 263. fixed bug that -1 population may accidently be set by god.
  74. X+ 264. fixed bug that caused missetting of gold/jewel value by god.
  75. X+ 265. allow god to manipulate an army that is up for trade.
  76. X+ 266. added check to assure that navies do not carry invalid troops.
  77. X+ 267. added check for onboard armies to be sure they were actually on fleets.
  78. X+ 268. reformated the bottom of the display on the read message display.
  79. X+ 269. made sure that stones had the designation of '?' to allow them to work.
  80. X+ 270. increased reduction on movement in desert for DERVISH to avoid confusion.
  81. X+ 271. made sure that blank input would not be taken on redesignate owner.
  82. X+ 272. fiddled and diddled (sorry Johnny!) with the charity change check.
  83. X+ 273. fixed bug with providing movement to unmovable when having ROADS power.
  84. X+ 274. added ifdef's around srand declarations for ANSI compilers. [C. Fu]
  85. X+ 275. removed error message for people relocation.  too common an occurance.
  86. X+ 276. allow naval battles along shore. [Charles C. Fu]
  87. X+ 277. prevent sailors or marines from retreating. [Charles C. Fu]
  88. X+ 278. redid the retreat code... made the test much simpler.
  89. X+ 279. slight adjustment to ONMAP macro [Charles C. Fu]
  90. X+ 280. keep random value of army sizes the same for when seen. [Charles C. Fu]
  91. X+ 281. keep random value of ship sizes the same when seen. [Charles C. Fu]
  92. X+ 282. keep random value of people in sector the same. [Charles C. Fu]
  93. X+ 283. do not allow navies to pass into impassible land [partial fix: C. Fu]
  94. X+ 284. make it harder to unload armies in enemy cities [Charles C. Fu]
  95. X+ 285. make it harder to load armies in enemy cities [Charles C. Fu]
  96. X+ 286. fixed mistype "P_ASOLD" => "P_ATYPE" npc.c [Charles C. Fu]
  97. X+ 287. check for division by zero with metals cost for troops
  98. X+ 288. make NPC pay metal for troops. [Charles C. Fu]
  99. X+ 289. have NPC nations adjust tax rates as appropriate. [Charles C. Fu]
  100. X+ 290. give rebel nations a tax rate of 10. [Charles C. Fu]
  101. X+ 291. extend view of tradeing list for long screens [Charles C. Fu]
  102. X+ 292. refresh() added to end of trade input routine  [Charles C. Fu]
  103. X+ 293. do not process invalid country is takeback [Charles C. Fu]
  104. X+ 294. cause trade to fail for destroyed army or fleet. [Charles C. Fu]
  105. X+ 295. fixed mistype which prevented sale of land. [Charles C. Fu]
  106. X+     {Darn!, My sabotage was caught! :-) adam}
  107. X+ 296. fixed missetting of curntn which blocked ship trades [Charles C. Fu]
  108. X+     {Foiled Again! :-) Actually that code predated curntn use, so
  109. X+     we were bound to miss some in the conversion, adam}
  110. X+ 297. fixed bug with returning bids to losing nations [Charles C. Fu]
  111. X+ 298. let land trades fail during trade, not before [Charles C. Fu] (whatever)
  112. X+ 299. convert to doubles for calculation of treasury overflow. [C. Fu]
  113. X+ 300. relocated adjustment to MARCHer movment when changing statuses.
  114. X+ 301. added in a routine to give the items up for trade to a nation if
  115. X+     it captures a nations capitol.  [David Soleno]
  116. X+ 302. fixed error messages generated by the orc takeover routine.
  117. X+ 303. made the rules file be read in from the default directory.
  118. X+ 304. made spell point gain for MONST powers additive.
  119. X+ 305. put a 25% cap on user defined charity.
  120. X+ 306. adjusted the combat routine to separate naval and army combat checks.
  121. X+ 307. added in a check to assure that combining overlarge fleets is checked.
  122. X+ 308. verified input checks in various locations in report.c.
  123. X+ 309. made god adjustment of ships to allow keeping of previous values on '\n'.
  124. X+ 310. gave god the ability to adjust army unit types.
  125. X+ 311. gave god the ability to adjust army move values.
  126. X+ 312. gave god the ability to adjust navy move values.
  127. X+ 313. fixed bug in reporting side during newspaper for naval battles.
  128. X+ 314. gave god the ability to adjust an army status.
  129. X  
  130. X  -------------------------------------------------------------------------
  131. X  | 2.0 POSSIBLE SHORT-TERM ENHANCEMENTS/FIXES FOR CONQUER V5             |
  132. X*** oREADME    Sat Mar  3 15:27:38 1990
  133. X--- README    Sat Mar  3 15:27:53 1990
  134. X***************
  135. X*** 94,99 ****
  136. X--- 94,106 ----
  137. X      unreferenced symbol errors occur,  try adding "-ltermcap" after
  138. X      the "-lcurses" line in the makefile.
  139. X  
  140. X+ Note2: With some versions of 'make' the SHELL environment variable is
  141. X+     read to determine under what shell jobs should be spawned.  The
  142. X+     Makefile for conquer was written with '/bin/sh' in mind, so if
  143. X+     any "command not found" errors appear, doing a:
  144. X+         setenv SHELL /bin/sh
  145. X+     before typing 'make', might alleviate the problem.
  146. X+ 
  147. X  -----------------------------------------------------------
  148. X  V   administration instructions
  149. X  -----------------------------------------------------------
  150. X***************
  151. X*** 109,115 ****
  152. X          -a          add new player
  153. X          -x          execute program
  154. X          -d DIR      to use play different game
  155. X-         -p          print a map
  156. X          -r SCENARIO read map while making a new world
  157. X                  uses SCENARIO.ele, SCENARIO.veg, &  SCENARIO.nat
  158. X  
  159. X--- 116,121 ----
  160. X*** odata.h    Sat Mar  3 15:27:39 1990
  161. X--- data.h    Sat Mar  3 15:27:53 1990
  162. X***************
  163. X*** 581,587 ****
  164. X  
  165. X  /* magic macro: returns TRUE if the nation has that power*/
  166. X  #define    magic(NATION,POWER)    ((ntn[NATION].powers&(POWER))!=0)
  167. X! #define    ONMAP(x,y)    (x>=0 && y>=0 && x<MAPX && y<MAPY)
  168. X  
  169. X  #ifndef HILIGHT
  170. X  #define    standout()
  171. X--- 581,587 ----
  172. X  
  173. X  /* magic macro: returns TRUE if the nation has that power*/
  174. X  #define    magic(NATION,POWER)    ((ntn[NATION].powers&(POWER))!=0)
  175. X! #define    ONMAP(x,y)    ((x)>=0 && (y)>=0 && (x)<MAPX && (y)<MAPY)
  176. X  
  177. X  #ifndef HILIGHT
  178. X  #define    standout()
  179. X***************
  180. X*** 610,616 ****
  181. X  #define    check()    checkout(__FILE__,__LINE__)
  182. X  #endif DEBUG
  183. X  
  184. X! #define    GOLDTHRESH    10    /* min ratio of gold:jewels */
  185. X  
  186. X  #define    SALT "aa"        /* seed for crypt() encryption    */
  187. X  
  188. X--- 610,616 ----
  189. X  #define    check()    checkout(__FILE__,__LINE__)
  190. X  #endif DEBUG
  191. X  
  192. X! #define    GOLDTHRESH    10L    /* min ratio of gold:jewels */
  193. X  
  194. X  #define    SALT "aa"        /* seed for crypt() encryption    */
  195. X  
  196. X*** oadmin.c    Sat Mar  3 15:27:39 1990
  197. X--- admin.c    Sat Mar  3 15:27:53 1990
  198. X***************
  199. X*** 53,59 ****
  200. X--- 53,61 ----
  201. X      int geteuid(), getuid(), setuid(), realuser, l;
  202. X      register int i,j;
  203. X      char *name;
  204. X+ #ifndef __STDC__
  205. X      void srand();
  206. X+ #endif
  207. X      int getopt();
  208. X      long time();
  209. X      /* mflag = make world, a=add player, x=execute, p=print */
  210. X*** oextcmds.c    Sat Mar  3 15:27:40 1990
  211. X--- extcmds.c    Sat Mar  3 15:27:54 1990
  212. X***************
  213. X*** 178,192 ****
  214. X          errormsg("Uh, sir.  Aren't we doing that already?");
  215. X          return;
  216. X      }
  217. X-     /* eliminate half starting movement if start out on march */
  218. X-     if( P_ASTAT==MARCH && new_stat!=MARCH ) {
  219. X-         if(P_AMOVE<(curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE)))/50){
  220. X-             errormsg("That troop has gone too far to stop marching");
  221. X-             return;
  222. X-         }
  223. X-         P_AMOVE-=(curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE)))/50;
  224. X-         AADJMOV;
  225. X-     }
  226. X      if(new_stat == SCOUT) {
  227. X          if(( P_ATYPE != A_SCOUT )&&( P_ASOLD >= 25)) {
  228. X              errormsg("Need less than 25 men to scout");
  229. X--- 178,183 ----
  230. X***************
  231. X*** 232,237 ****
  232. X--- 223,238 ----
  233. X              errormsg("Sorry, but you can't rule in that sector");
  234. X              return;
  235. X          }
  236. X+     }
  237. X+ 
  238. X+     /* eliminate half starting movement if start out on march */
  239. X+     if( P_ASTAT==MARCH && new_stat!=MARCH ) {
  240. X+         if(P_AMOVE<(curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE)))/50){
  241. X+             errormsg("That troop has gone too far to stop marching");
  242. X+             return;
  243. X+         }
  244. X+         P_AMOVE-=(curntn->maxmove * *(unitmove+(P_ATYPE%UTYPE)))/50;
  245. X+         AADJMOV;
  246. X      }
  247. X  
  248. X      /* location dependent statuses make armies stay in place */
  249. X*** orandeven.c    Sat Mar  3 15:27:43 1990
  250. X--- randeven.c    Sat Mar  3 15:27:54 1990
  251. X***************
  252. X*** 207,212 ****
  253. X--- 207,213 ----
  254. X      ntn[new].powers= ntn[target].powers;
  255. X      ntn[new].tships= 0;
  256. X      ntn[new].tsctrs = split;
  257. X+     ntn[new].tax_rate = 10;
  258. X  
  259. X      /* first check first letter of name */
  260. X      if( markok(toupper(ntn[new].name[0]),FALSE) )
  261. X*** ocexecute.c    Sat Mar  3 15:27:39 1990
  262. X--- cexecute.c    Sat Mar  3 15:27:55 1990
  263. X***************
  264. X*** 197,203 ****
  265. X              back into your capitol */
  266. X              if((sct[x][y].owner!=country)&&(country!=0)) {
  267. X                  sct[curntn->capx][curntn->capy].people+=armynum;
  268. X-                 fprintf(stderr,"ERROR: <%s> told to put %d civilians in sector %d,%d not owned - placed in capitol\n",curntn->name,armynum,x,y);
  269. X                  break;
  270. X              }
  271. X              sct[x][y].people=armynum;
  272. X--- 197,202 ----
  273. X***************
  274. X*** 206,212 ****
  275. X              /* if you dont own it, put people in your capitol */
  276. X              if((sct[x][y].owner!=country)&&(country!=0)) {
  277. X                  sct[curntn->capx][curntn->capy].people+=armynum;
  278. X-                 fprintf(stderr,"SACIV3: <%s> told to put %d civilians in sector %d,%d not owned - placed in capitol\n",curntn->name,armynum,x,y);
  279. X              }
  280. X              else
  281. X              {
  282. X--- 205,210 ----
  283. X***************
  284. X*** 258,264 ****
  285. X          case DESTRY:
  286. X              sct[ntn[armynum].capx][ntn[armynum].capy].owner=savectry;
  287. X              country=armynum;
  288. X!             destroy(country);
  289. X              country=savectry;
  290. X              break;
  291. X          case CHG_MGK:
  292. X--- 256,262 ----
  293. X          case DESTRY:
  294. X              sct[ntn[armynum].capx][ntn[armynum].capy].owner=savectry;
  295. X              country=armynum;
  296. X!             if (isupdate) destroy(country);
  297. X              country=savectry;
  298. X              break;
  299. X          case CHG_MGK:
  300. X*** oforms.c    Sat Mar  3 15:27:40 1990
  301. X--- forms.c    Sat Mar  3 15:27:55 1990
  302. X***************
  303. X*** 579,595 ****
  304. X          intval = get_number();
  305. X          if (intval < 0) {
  306. X              break;
  307. X!         } else if( intval > 100 )
  308. X              errormsg("ERROR - invalid charity rate");
  309. X          /* this will protect from both underflow and overflow */
  310. X!         else if((int)curntn->popularity + 2*(intval - (int)curntn->charity)>100)
  311. X!             errormsg("ERROR - you may not increase charity that much");
  312. X!         else if((int)curntn->popularity + 2*(intval - (int)curntn->charity)<0)
  313. X!             errormsg("ERROR - you may not decrease charity that much");
  314. X!         else {
  315. X!             curntn->popularity += (unsigned char) 2*(intval - (int) curntn->charity);
  316. X!             curntn->charity = intval;
  317. X!             NADJNTN;
  318. X          }
  319. X          break;
  320. X      case '5':    /* terror */
  321. X--- 579,607 ----
  322. X          intval = get_number();
  323. X          if (intval < 0) {
  324. X              break;
  325. X!         } else if( intval > 100 ) {
  326. X              errormsg("ERROR - invalid charity rate");
  327. X+         } else if (intval > 25) {
  328. X+             errormsg("You are kidding, right?");
  329. X          /* this will protect from both underflow and overflow */
  330. X!         } else if(intval > curntn->charity) {
  331. X!             if (2 * (intval - (int)curntn->charity) + (int) curntn->popularity > 100) {
  332. X!                 errormsg("ERROR - you may not increase charity that much");
  333. X!             } else {
  334. X!                 curntn->popularity += (unsigned char) 2*(intval - (int) curntn->charity);
  335. X!                 curntn->charity = intval;
  336. X!                 NADJNTN;
  337. X!                 NADJNTN2;
  338. X!             }
  339. X!         } else {
  340. X!             if (2 * (intval - (int)curntn->charity) < - (int) curntn->popularity) {
  341. X!                 errormsg("ERROR - you may not decrease charity that much");
  342. X!             } else {
  343. X!                 curntn->popularity += (unsigned char) 2*(intval - (int) curntn->charity);
  344. X!                 curntn->charity = intval;
  345. X!                 NADJNTN;
  346. X!                 NADJNTN2;
  347. X!             }
  348. X          }
  349. X          break;
  350. X      case '5':    /* terror */
  351. X*** omisc.c    Sat Mar  3 15:27:41 1990
  352. X--- misc.c    Sat Mar  3 15:27:55 1990
  353. X***************
  354. X*** 886,891 ****
  355. X--- 886,894 ----
  356. X      /* advertise */
  357. X      fprintf(fnews,"1.\tCapitol of %s sacked by %s\n",ntn[cntry].name,ntn[nation].name);
  358. X  
  359. X+         /* Remove goods from trade board */
  360. X+     fixtrade(cntry);
  361. X+ 
  362. X      /* first give all prizes to the conquerer */
  363. X      if(curntn->tgold > 0) {            /* all gold */
  364. X          ntn[nation].tgold += curntn->tgold;
  365. X***************
  366. X*** 1088,1096 ****
  367. X          } /* switch */
  368. X      } /* for */
  369. X  
  370. X!     if((magic(cntry,DERVISH)==1) ||(magic(cntry,DESTROYER)==1)) {
  371. X!         veg_cost[ ICE ] = 1;
  372. X!         veg_cost[ DESERT ] = 1;
  373. X      }
  374. X  
  375. X      for( j = 0; ele[j] != '0'; j++ ) {
  376. X--- 1091,1099 ----
  377. X          } /* switch */
  378. X      } /* for */
  379. X  
  380. X!     if(magic(cntry,DERVISH) || magic(cntry,DESTROYER)) {
  381. X!         veg_cost[ ICE ] = 0;
  382. X!         veg_cost[ DESERT ] = 0;
  383. X      }
  384. X  
  385. X      for( j = 0; ele[j] != '0'; j++ ) {
  386. X*** oreports.c    Sat Mar  3 15:27:43 1990
  387. X--- reports.c    Sat Mar  3 15:27:55 1990
  388. X***************
  389. X*** 143,149 ****
  390. X                  continue;
  391. X              }
  392. X  #ifdef TRADE
  393. X!             if(P_ASTAT==TRADED) {
  394. X                  errormsg("May not change traded army");
  395. X                  continue;
  396. X              }
  397. X--- 143,149 ----
  398. X                  continue;
  399. X              }
  400. X  #ifdef TRADE
  401. X!             if(isgod==FALSE && P_ASTAT==TRADED) {
  402. X                  errormsg("May not change traded army");
  403. X                  continue;
  404. X              }
  405. X***************
  406. X*** 154,160 ****
  407. X              ypos++;
  408. X              clrtoeol();
  409. X  #ifdef OGOD
  410. X!             if(isgod==TRUE) mvaddstr(ypos++,0,"GOD OPTIONS: 6) LOCATION 7) SOLDIERS");
  411. X              clrtoeol();
  412. X  #endif OGOD
  413. X              ypos++;
  414. X--- 154,160 ----
  415. X              ypos++;
  416. X              clrtoeol();
  417. X  #ifdef OGOD
  418. X!             if(isgod==TRUE) mvaddstr(ypos++,0,"GOD OPTIONS: 6) LOCATION 7) SOLDIERS 8) MOVE 9) UNITTYPE 0) STATUS ");
  419. X              clrtoeol();
  420. X  #endif OGOD
  421. X              ypos++;
  422. X***************
  423. X*** 272,283 ****
  424. X                      mvaddstr(ypos++,0,"What is the New Total Soldiers: ");
  425. X                      refresh();
  426. X                      men = get_number();
  427. X!                     if (men>0) {
  428. X                          P_ASOLD=men;
  429. X                          AADJMEN;
  430. X                      }
  431. X                  }
  432. X                  break;
  433. X  #endif OGOD
  434. X              default:
  435. X                  errormsg("Invalid Input");
  436. X--- 272,328 ----
  437. X                      mvaddstr(ypos++,0,"What is the New Total Soldiers: ");
  438. X                      refresh();
  439. X                      men = get_number();
  440. X!                     if (men>=0) {
  441. X                          P_ASOLD=men;
  442. X                          AADJMEN;
  443. X                      }
  444. X                  }
  445. X                  break;
  446. X+             case '8':
  447. X+                 if (isgod == TRUE) {
  448. X+                     mvaddstr(ypos, 0, "What is the new movement value?");
  449. X+                     refresh();
  450. X+                     men = get_number();
  451. X+ 
  452. X+                     if (men >=0 && men <= 100) {
  453. X+                         P_AMOVE = men;
  454. X+                     }
  455. X+                 }
  456. X+                 break;
  457. X+             case '9':
  458. X+                 if (isgod == TRUE) {
  459. X+                     mvaddstr(ypos++, 0, "Change unit type; Normal 0-26, Leader 27-44, Monster 45-59");
  460. X+                     mvaddstr(ypos++, 0, "[MajorHackEH?] New Type is? ");
  461. X+                     refresh();
  462. X+                     men = get_number();
  463. X+ 
  464. X+                     if (men < 0 || men > MAXMONSTER) break;
  465. X+                     if (men > 44) men += TWOUTYPE;
  466. X+                     else if (men > NOUNITTYPES) men += UTYPE;
  467. X+                     
  468. X+                     P_ATYPE = men;
  469. X+                 }
  470. X+                 break;
  471. X+             case '0':
  472. X+                 if (isgod == TRUE) {
  473. X+                     mvprintw(ypos++, 0, "1) Mar 2) Sct 3) Garr 4) Trade 5) Mil 6) Fly 7) Def 8) MDef 9) Att 10) MAtt");
  474. X+                     mvprintw(ypos++, 0, "11) Genrl 12) Sort 13) Sieg 14) Sgd 15) Onb 16) Rule 17+) Group (leader-=17)");
  475. X+                     mvaddstr(ypos++, 0, "Set what status? ");
  476. X+                     refresh();
  477. X+                     men = get_number();
  478. X+ 
  479. X+                     if (men < 0 || men > NUMSTATUS+MAXARM)
  480. X+                       break;
  481. X+                     if (men >= NUMSTATUS) {
  482. X+                       i = curntn->arm[men-NUMSTATUS].unittyp;
  483. X+                       if (i < MINLEADER || i >= MINMONSTER) {
  484. X+                         errormsg("There is no such leader to group under");
  485. X+                         break;
  486. X+                       }
  487. X+                     }
  488. X+                     P_ASTAT = men;
  489. X+                 }
  490. X+                 break;
  491. X  #endif OGOD
  492. X              default:
  493. X                  errormsg("Invalid Input");
  494. X***************
  495. X*** 585,593 ****
  496. X              clrtoeol();
  497. X              refresh();
  498. X              nvynum = get_number();
  499. X!             if(nvynum<0) break;
  500. X  #ifdef TRADE
  501. X!             if (curntn->nvy[nvynum].commodity==TRADED) {
  502. X                  errormsg("Sorry - That Navy is up for trade");
  503. X                  continue;
  504. X              }
  505. X--- 630,638 ----
  506. X              clrtoeol();
  507. X              refresh();
  508. X              nvynum = get_number();
  509. X!             if(nvynum<0) continue;
  510. X  #ifdef TRADE
  511. X!             if (isgod == FALSE && curntn->nvy[nvynum].commodity==TRADED) {
  512. X                  errormsg("Sorry - That Navy is up for trade");
  513. X                  continue;
  514. X              }
  515. X***************
  516. X*** 599,605 ****
  517. X              mvaddstr(ypos++,0,"OPTIONS: 1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY");
  518. X                clrtoeol();
  519. X  #ifdef OGOD
  520. X!             if(isgod==TRUE) mvaddstr(ypos++,0,"GOD OPTIONS:  4) ADJUST SHIPS, 5) LOCATION, 6) CREW");
  521. X              ypos++;
  522. X              clrtoeol();
  523. X  #endif OGOD
  524. X--- 644,650 ----
  525. X              mvaddstr(ypos++,0,"OPTIONS: 1) TRANSFER / MERGE, 2) SPLIT NAVY, 3) DISBAND NAVY");
  526. X                clrtoeol();
  527. X  #ifdef OGOD
  528. X!             if(isgod==TRUE) mvaddstr(ypos++,0,"GOD OPTIONS:  4) ADJUST SHIPS, 5) LOCATION, 6) CREW 7) MOVE");
  529. X              ypos++;
  530. X              clrtoeol();
  531. X  #endif OGOD
  532. X***************
  533. X*** 630,635 ****
  534. X--- 675,699 ----
  535. X                      errormsg("Sorry -- One of the two Armies must be unloaded");
  536. X                  }
  537. X                  else if((newx==P_NXLOC)&&(newy==P_NYLOC)) {
  538. X+                     /* first check sizes */
  539. X+                     for(i=N_LIGHT;i<=N_HEAVY;i++) {
  540. X+                         if (P_NGAL(i) + SHIPS(curntn->nvy[newnavy].galleys,i) > N_MASK) {
  541. X+                             i = (-1);
  542. X+                             break;
  543. X+                         }
  544. X+                         if (P_NMER(i) + SHIPS(curntn->nvy[newnavy].merchant,i) > N_MASK) {
  545. X+                             i = (-1);
  546. X+                             break;
  547. X+                         }
  548. X+                         if (P_NWAR(i) + SHIPS(curntn->nvy[newnavy].warships,i) > N_MASK) {
  549. X+                             i = (-1);
  550. X+                             break;
  551. X+                         }
  552. X+                     }
  553. X+                     if (i == (-1)) {
  554. X+                       errormsg("That would cause you to have too many ships of one type");
  555. X+                       break;
  556. X+                     }
  557. X                      crew = flthold(nvynum)*P_NCREW;
  558. X                      people = fltmhold(nvynum)*P_NPEOP;
  559. X                      crew += flthold(newnavy)*curntn->nvy[newnavy].crew;
  560. X***************
  561. X*** 691,699 ****
  562. X                  curntn->nvy[navy].people=P_NPEOP;
  563. X                  curntn->nvy[navy].smove=P_NMOVE;
  564. X                      
  565. X                  mvaddstr(LINES-2,0,"Do you wish to separate warships from remainder of fleet?");
  566. X                  refresh();
  567. X!                 if(getch()=='y') {
  568. X                      curntn->nvy[navy].warships=P_NWSHP;
  569. X                      P_NWSHP=0;
  570. X                      NADJWAR;
  571. X--- 755,764 ----
  572. X                  curntn->nvy[navy].people=P_NPEOP;
  573. X                  curntn->nvy[navy].smove=P_NMOVE;
  574. X                      
  575. X+                 if (P_NWSHP != 0)
  576. X                  mvaddstr(LINES-2,0,"Do you wish to separate warships from remainder of fleet?");
  577. X                  refresh();
  578. X!                 if(P_NWSHP!=0 && getch()=='y') {
  579. X                      curntn->nvy[navy].warships=P_NWSHP;
  580. X                      P_NWSHP=0;
  581. X                      NADJWAR;
  582. X***************
  583. X*** 715,720 ****
  584. X--- 780,786 ----
  585. X                      break;
  586. X                  }
  587. X                  for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  588. X+                     if (P_NWAR(shipsize) == 0) continue;
  589. X                      mvprintw(ypos,0,"How Many %s Warships To Split?",fltstr[shipsize]);
  590. X                      clrtoeol();
  591. X                      refresh();
  592. X***************
  593. X*** 724,729 ****
  594. X--- 790,796 ----
  595. X                      (void) addwships(navy,shipsize,newnavy);
  596. X                  }
  597. X                  for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  598. X+                     if (P_NMER(shipsize) == 0) continue;
  599. X                      mvprintw(ypos,0,"How Many %s Merchants To Split?",fltstr[shipsize]);
  600. X                      clrtoeol();
  601. X                      refresh();
  602. X***************
  603. X*** 733,738 ****
  604. X--- 800,806 ----
  605. X                      (void) addmships(navy,shipsize,newnavy);
  606. X                  }
  607. X                  for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  608. X+                     if (P_NGAL(shipsize) == 0) continue;
  609. X                      mvprintw(ypos,0,"How Many %s Galleys To Split?",fltstr[shipsize]);
  610. X                      clrtoeol();
  611. X                      refresh();
  612. X***************
  613. X*** 791,822 ****
  614. X              case '4':
  615. X                  if (isgod==TRUE) {
  616. X                      /* ADJUST SHIPS */
  617. X-                     P_NWSHP=0;
  618. X-                     P_NMSHP=0;
  619. X-                     P_NGSHP=0;
  620. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  621. X!                         mvprintw(ypos,0,"How Many %s Warships?",fltstr[shipsize]);
  622. X                          clrtoeol();
  623. X                          refresh();
  624. X                          newnavy = get_number();
  625. X!                         if(newnavy>N_MASK||newnavy<0) newnavy=0;
  626. X!                         (void) NADD_WAR(newnavy);
  627. X                      }
  628. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  629. X!                         mvprintw(ypos,0,"How Many %s Merchants?",fltstr[shipsize]);
  630. X                          clrtoeol();
  631. X                          refresh();
  632. X                          newnavy = get_number();
  633. X!                         if(newnavy>N_MASK||newnavy<0) newnavy=0;
  634. X!                         (void) NADD_MER(newnavy);
  635. X                      }
  636. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  637. X!                         mvprintw(ypos,0,"How Many %s Galleys?",fltstr[shipsize]);
  638. X                          clrtoeol();
  639. X                          refresh();
  640. X                          newnavy = get_number();
  641. X!                         if(newnavy>N_MASK||newnavy<0) newnavy=0;
  642. X!                         (void) NADD_GAL(newnavy);
  643. X                      }
  644. X                      NADJWAR;
  645. X                      NADJMER;
  646. X--- 859,908 ----
  647. X              case '4':
  648. X                  if (isgod==TRUE) {
  649. X                      /* ADJUST SHIPS */
  650. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  651. X!                         mvprintw(ypos,0,"How Many %s Warships? [%d] ",
  652. X!                              fltstr[shipsize],P_NWAR(shipsize));
  653. X                          clrtoeol();
  654. X                          refresh();
  655. X                          newnavy = get_number();
  656. X!                         if (newnavy < 0 || newnavy > N_MASK) continue;
  657. X!                         newnavy -= P_NWAR(shipsize);
  658. X!                         if (newnavy > 0) {
  659. X!                             (void) NADD_WAR(newnavy);
  660. X!                         } else if (newnavy < 0) {
  661. X!                             newnavy = -newnavy;
  662. X!                             (void) NSUB_WAR(newnavy);
  663. X!                         }
  664. X                      }
  665. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  666. X!                         mvprintw(ypos,0,"How Many %s Merchants? [%d] ",
  667. X!                              fltstr[shipsize], P_NMER(shipsize));
  668. X                          clrtoeol();
  669. X                          refresh();
  670. X                          newnavy = get_number();
  671. X!                         if(newnavy>N_MASK||newnavy<0) continue;
  672. X!                         newnavy -= P_NMER(shipsize);
  673. X!                         if (newnavy > 0) {
  674. X!                           (void) NADD_MER(newnavy);
  675. X!                         } else if (newnavy < 0) {
  676. X!                           newnavy = -newnavy;
  677. X!                           (void) NSUB_MER(newnavy);
  678. X!                         }
  679. X                      }
  680. X                      for(shipsize=N_LIGHT;shipsize<=N_HEAVY;shipsize++) {
  681. X!                         mvprintw(ypos,0,"How Many %s Galleys? [%d]",
  682. X!                              fltstr[shipsize], P_NGAL(shipsize));
  683. X                          clrtoeol();
  684. X                          refresh();
  685. X                          newnavy = get_number();
  686. X!                         if(newnavy>N_MASK||newnavy<0) continue;
  687. X!                         newnavy -= P_NGAL(shipsize);
  688. X!                         if (newnavy > 0) {
  689. X!                           (void) NADD_GAL(newnavy);
  690. X!                         } else if (newnavy < 0) {
  691. X!                           newnavy = -newnavy;
  692. X!                           (void) NSUB_GAL(newnavy);
  693. X!                         }
  694. X                      }
  695. X                      NADJWAR;
  696. X                      NADJMER;
  697. X***************
  698. X*** 850,855 ****
  699. X--- 936,951 ----
  700. X                      if (crew>=0 && crew<=SHIPCREW) {
  701. X                          P_NCREW = crew;
  702. X                          NADJCRW;
  703. X+                     }
  704. X+                 }
  705. X+                 break;
  706. X+             case '7':
  707. X+                 if (isgod == TRUE) {
  708. X+                     mvaddstr(ypos, 0, "Set what move value? ");
  709. X+                     refresh();
  710. X+                     newnavy = get_number();
  711. X+                     if (newnavy <= 100 && newnavy >= 0) {
  712. X+                         P_NMOVE = newnavy;
  713. X                      }
  714. X                  }
  715. X                  break;
  716. X*** ocombat.c    Sat Mar  3 15:27:39 1990
  717. X--- combat.c    Sat Mar  3 15:27:56 1990
  718. X***************
  719. X*** 37,42 ****
  720. X--- 37,47 ----
  721. X  int    dnation;        /*one nation defending in this fight*/
  722. X  int    count=0;                /*number of armies or navies in sector*/
  723. X  
  724. X+ /* indicators of naval or army combat */
  725. X+ #define COMBAT_X    0
  726. X+ #define COMBAT_A    1
  727. X+ #define COMBAT_N    2
  728. X+ 
  729. X  /************************************************************************/
  730. X  /*    COMBAT()    run all combat on the map            */
  731. X  /*      for each sector, determine if armies in with attack mode    */
  732. X***************
  733. X*** 45,51 ****
  734. X  combat()
  735. X  {
  736. X      register int i,j;
  737. X!     char    **fought;         /* TRUE if already fought in sctr */
  738. X      int    temp,ctry;
  739. X      int    initialized=FALSE;    /* TRUE if arrays initialized */
  740. X      short    armynum,nvynum;
  741. X--- 50,56 ----
  742. X  combat()
  743. X  {
  744. X      register int i,j;
  745. X!     char    **fought;         /* SET: if already fought in sctr */
  746. X      int    temp,ctry;
  747. X      int    initialized=FALSE;    /* TRUE if arrays initialized */
  748. X      short    armynum,nvynum;
  749. X***************
  750. X*** 60,66 ****
  751. X      /*for each nation, if in attack mode run a check*/
  752. X  
  753. X      /* no sectors have been fought in yet */
  754. X!     for(i=0;i<MAPX;i++) for(j=0;j<MAPY;j++) fought[i][j]=FALSE;
  755. X  
  756. X      for(ctry=NTOTAL-1;ctry>0;ctry--) if(isactive(ntn[ctry].active)) {
  757. X  
  758. X--- 65,71 ----
  759. X      /*for each nation, if in attack mode run a check*/
  760. X  
  761. X      /* no sectors have been fought in yet */
  762. X!     for(i=0;i<MAPX;i++) for(j=0;j<MAPY;j++) fought[i][j]=COMBAT_X;
  763. X  
  764. X      for(ctry=NTOTAL-1;ctry>0;ctry--) if(isactive(ntn[ctry].active)) {
  765. X  
  766. X***************
  767. X*** 72,83 ****
  768. X              if((aptr->sold>0)
  769. X              &&(aptr->stat>=ATTACK)
  770. X              &&(aptr->stat<=SORTIE||aptr->stat>=NUMSTATUS)
  771. X!             &&(!fought[aptr->xloc][aptr->yloc])){
  772. X  
  773. X              /* someone can initiate combat in xspot,yspot */
  774. X              xspot=aptr->xloc;
  775. X              yspot=aptr->yloc;
  776. X!             fought[xspot][yspot]=TRUE;
  777. X  
  778. X              /*initialize matrix*/
  779. X              if( !initialized ) {
  780. X--- 77,88 ----
  781. X              if((aptr->sold>0)
  782. X              &&(aptr->stat>=ATTACK)
  783. X              &&(aptr->stat<=SORTIE||aptr->stat>=NUMSTATUS)
  784. X!             &&(!(fought[aptr->xloc][aptr->yloc]&COMBAT_A))){
  785. X  
  786. X              /* someone can initiate combat in xspot,yspot */
  787. X              xspot=aptr->xloc;
  788. X              yspot=aptr->yloc;
  789. X!             fought[xspot][yspot]|=COMBAT_A;
  790. X  
  791. X              /*initialize matrix*/
  792. X              if( !initialized ) {
  793. X***************
  794. X*** 131,142 ****
  795. X          /*navy combat*/
  796. X          for(j=0;j<MAXNAVY;j++)
  797. X          if((nptr->nvy[j].warships!=0)
  798. X!         &&(fought[nptr->nvy[j].xloc][nptr->nvy[j].yloc]==0)
  799. X!         &&(sct[nptr->nvy[j].xloc][nptr->nvy[j].yloc].altitude==WATER)){
  800. X  
  801. X              xspot=nptr->nvy[j].xloc;
  802. X              yspot=nptr->nvy[j].yloc;
  803. X!             fought[xspot][yspot]=1;
  804. X  
  805. X              /*initialize matrix*/
  806. X              if( !initialized ){
  807. X--- 136,146 ----
  808. X          /*navy combat*/
  809. X          for(j=0;j<MAXNAVY;j++)
  810. X          if((nptr->nvy[j].warships!=0)
  811. X!         &&(!(fought[nptr->nvy[j].xloc][nptr->nvy[j].yloc]&COMBAT_N))) {
  812. X  
  813. X              xspot=nptr->nvy[j].xloc;
  814. X              yspot=nptr->nvy[j].yloc;
  815. X!             fought[xspot][yspot]|=COMBAT_N;
  816. X  
  817. X              /*initialize matrix*/
  818. X              if( !initialized ){
  819. X***************
  820. X*** 156,166 ****
  821. X              if(isactive(ntn[country].active))
  822. X              for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  823. X              if((NWSHP+NMSHP+NGSHP!=0)
  824. X!             &&(abs(NXLOC-xspot)<=2)
  825. X!             &&(abs(NYLOC-yspot)<=2)
  826. X!             &&(sct[NXLOC][NYLOC].altitude==WATER)
  827. X              &&(count<MGKNUM)) {
  828. X!                 fought[NXLOC][NYLOC]=1;
  829. X                  if((country!=ctry)
  830. X                  &&(nptr->dstatus[country]>HOSTILE)){
  831. X                      valid=TRUE;
  832. X--- 160,171 ----
  833. X              if(isactive(ntn[country].active))
  834. X              for(nvynum=0;nvynum<MAXNAVY;nvynum++)
  835. X              if((NWSHP+NMSHP+NGSHP!=0)
  836. X!             &&(((NXLOC==xspot) && (NYLOC==yspot)) ||
  837. X!                (sct[NXLOC][NYLOC].altitude==WATER
  838. X!                 &&(abs(NXLOC-xspot)<=2)
  839. X!                 &&(abs(NYLOC-yspot)<=2)))
  840. X              &&(count<MGKNUM)) {
  841. X!                 fought[NXLOC][NYLOC]|=COMBAT_N;
  842. X                  if((country!=ctry)
  843. X                  &&(nptr->dstatus[country]>HOSTILE)){
  844. X                      valid=TRUE;
  845. X***************
  846. X*** 804,817 ****
  847. X  
  848. X      for(cnum=0;cnum<count;cnum++) if(owner[cnum]>(-1)){
  849. X          if( unitnum != (-1) ) cnum=unitnum;
  850. X!         if((side[cnum]==ATKR)&&(retreatside==ATKR)){
  851. X!             ntn[owner[cnum]].arm[unit[cnum]].xloc = retreatx;
  852. X!             ntn[owner[cnum]].arm[unit[cnum]].yloc = retreaty;
  853. X          }
  854. X-         else if((side[cnum]==DFND)&&(retreatside==DFND)){
  855. X-             ntn[owner[cnum]].arm[unit[cnum]].xloc = retreatx;
  856. X-             ntn[owner[cnum]].arm[unit[cnum]].yloc = retreaty;
  857. X-         }
  858. X          if( unitnum != (-1) ) return;
  859. X      }
  860. X  }
  861. X--- 809,824 ----
  862. X  
  863. X      for(cnum=0;cnum<count;cnum++) if(owner[cnum]>(-1)){
  864. X          if( unitnum != (-1) ) cnum=unitnum;
  865. X!         if(side[cnum] == retreatside){
  866. X!             if ((ntn[owner[cnum]].arm[unit[cnum]].unittyp==A_MARINES)||
  867. X!                 (ntn[owner[cnum]].arm[unit[cnum]].unittyp==A_SAILOR)){
  868. X!                 ntn[owner[cnum]].arm[unit[cnum]].sold *= 85;
  869. X!                 ntn[owner[cnum]].arm[unit[cnum]].sold /= 100;
  870. X!             } else {
  871. X!                 ntn[owner[cnum]].arm[unit[cnum]].xloc = retreatx;
  872. X!                 ntn[owner[cnum]].arm[unit[cnum]].yloc = retreaty;
  873. X!             }
  874. X          }
  875. X          if( unitnum != (-1) ) return;
  876. X      }
  877. X  }
  878. X***************
  879. X*** 868,875 ****
  880. X       *     galley crew                      2
  881. X       *     merchant crew                    4
  882. X       * soldiers onboard:
  883. X!       *     SAILOR/ARCHER                   3/4
  884. X!       *     MARINE                          1/3
  885. X       *     others                          4/3
  886. X       */
  887. X      for(j=0;j<count;j++) if(owner[j]!=(-1)){
  888. X--- 875,882 ----
  889. X       *     galley crew                      2
  890. X       *     merchant crew                    4
  891. X       * soldiers onboard:
  892. X!          *     SAILOR/ARCHER                   3/4
  893. X!          *     MARINE                          1/3
  894. X       *     others                          4/3
  895. X       */
  896. X      for(j=0;j<count;j++) if(owner[j]!=(-1)){
  897. X***************
  898. X*** 959,967 ****
  899. X      /* calculate capture percentages */
  900. X      /*
  901. X       *  This formula produces:
  902. X!       *        0% capture for   1:100  odds
  903. X       *        2% capture for   1:10   odds
  904. X!       *       15% capture for   1:1    odds
  905. X       *       60% capture for  10:1    odds
  906. X       *      100% capture for >60:1    odds
  907. X       *      with linear progression between each.
  908. X--- 966,974 ----
  909. X      /* calculate capture percentages */
  910. X      /*
  911. X       *  This formula produces:
  912. X!          *        0% capture for   1:100  odds
  913. X       *        2% capture for   1:10   odds
  914. X!          *       15% capture for   1:1    odds
  915. X       *       60% capture for  10:1    odds
  916. X       *      100% capture for >60:1    odds
  917. X       *      with linear progression between each.
  918. X***************
  919. X*** 1240,1249 ****
  920. X          k=0;
  921. X          for(i=0;i<j;i++) if(owner[j]==owner[i]) k=1;
  922. X          if(k==0) {
  923. X!         if(side[i]==DFND)
  924. X              fprintf(fnews,", attacker %s",ntn[owner[j]].name);
  925. X!         else if(side[i]==ATKR)
  926. X              fprintf(fnews,", defender %s",ntn[owner[j]].name);
  927. X          }
  928. X      }
  929. X      fprintf(fnews,"\n");
  930. X--- 1247,1257 ----
  931. X          k=0;
  932. X          for(i=0;i<j;i++) if(owner[j]==owner[i]) k=1;
  933. X          if(k==0) {
  934. X!         if(side[j]==ATKR)
  935. X              fprintf(fnews,", attacker %s",ntn[owner[j]].name);
  936. X!         else if(side[j]==DFND)
  937. X              fprintf(fnews,", defender %s",ntn[owner[j]].name);
  938. X+         else fprintf(fnews,", neutral %s",ntn[owner[j]].name);
  939. X          }
  940. X      }
  941. X      fprintf(fnews,"\n");
  942. X*** omove.c    Sat Mar  3 15:27:41 1990
  943. X--- move.c    Sat Mar  3 15:27:56 1990
  944. X***************
  945. X*** 63,68 ****
  946. X--- 63,72 ----
  947. X      } else {    /*army*/
  948. X          mvprintw(LINES-4,0,"ARMY %d: ",armynum);
  949. X          clrtoeol();
  950. X+         if (P_ASTAT>=NUMSTATUS) {
  951. X+             groupmen = P_ASTAT - NUMSTATUS;
  952. X+             P_AMOVE = curntn->arm[groupmen].smove;
  953. X+         }
  954. X          if(P_AMOVE==0){
  955. X              errormsg("That Unit is Not Able to Move");
  956. X              redraw=DONE;
  957. X***************
  958. X*** 74,81 ****
  959. X          if(P_ASTAT>=NUMSTATUS) {
  960. X              mvprintw(LINES-4,10,"Member of Army Group %d!! Continue? ",P_ASTAT-NUMSTATUS);
  961. X              refresh();
  962. X!             if( getch() == 'y' )  P_ASTAT=ATTACK;
  963. X!             else {
  964. X                  redraw=DONE;
  965. X                  armornvy=AORN;
  966. X                  return;
  967. X--- 78,87 ----
  968. X          if(P_ASTAT>=NUMSTATUS) {
  969. X              mvprintw(LINES-4,10,"Member of Army Group %d!! Continue? ",P_ASTAT-NUMSTATUS);
  970. X              refresh();
  971. X!             if( getch() == 'y' )  {
  972. X!                 P_ASTAT=ATTACK;
  973. X!                 AADJSTAT;
  974. X!             } else {
  975. X                  redraw=DONE;
  976. X                  armornvy=AORN;
  977. X                  return;
  978. X***************
  979. X*** 261,267 ****
  980. X                  valid=FALSE;
  981. X                  xcurs=oldxcurs;
  982. X                  ycurs=oldycurs;
  983. X!             } else if(movecost[XREAL][YREAL] >= 0){
  984. X                  /* LAND OF SOME TYPE */
  985. X                  valid=FALSE;
  986. X                  /* check for nearby water */
  987. X--- 267,274 ----
  988. X                  valid=FALSE;
  989. X                  xcurs=oldxcurs;
  990. X                  ycurs=oldycurs;
  991. X!             } else if(movecost[XREAL][YREAL] >= 0
  992. X!                   || movecost[XREAL][YREAL] == -2){
  993. X                  /* LAND OF SOME TYPE */
  994. X                  valid=FALSE;
  995. X                  /* check for nearby water */
  996. X*** oupdate.c    Sat Mar  3 15:27:45 1990
  997. X--- update.c    Sat Mar  3 15:27:59 1990
  998. X***************
  999. X*** 27,32 ****
  1000. X--- 27,42 ----
  1001. X  int    **attr;            /* sector attractiveness */
  1002. X  long    **newpop;        /* storage for old population */
  1003. X  
  1004. X+ long
  1005. X+ dtol(d) double d;
  1006. X+ {
  1007. X+     char tempstr[BIGLTH];
  1008. X+     long l;
  1009. X+     sprintf(tempstr,"%-60.0lf",d);
  1010. X+     sscanf(tempstr,"%ld",&l);
  1011. X+     return(l);
  1012. X+ }
  1013. X+ 
  1014. X  /****************************************************************/
  1015. X  /*    UPDATE() - updates the whole world            */
  1016. X  /****************************************************************/
  1017. X***************
  1018. X*** 625,631 ****
  1019. X              if(rand()%100 < 30) {    /* new leader takes over */
  1020. X                  x++;
  1021. X                  for(armynum=0;armynum<MAXARM;armynum++)
  1022. X!                     if(P_ATYPE == x) break;
  1023. X                  if( armynum<MAXARM) {
  1024. X                      P_ATYPE=x-1;
  1025. X                      P_ASOLD= *(unitminsth+(x-1)%UTYPE);
  1026. X--- 635,641 ----
  1027. X              if(rand()%100 < 30) {    /* new leader takes over */
  1028. X                  x++;
  1029. X                  for(armynum=0;armynum<MAXARM;armynum++)
  1030. X!                     if(P_ATYPE == x && P_ASOLD > 0) break;
  1031. X                  if( armynum<MAXARM) {
  1032. X                      P_ATYPE=x-1;
  1033. X                      P_ASOLD= *(unitminsth+(x-1)%UTYPE);
  1034. X***************
  1035. X*** 699,706 ****
  1036. X                  ntn[country].spellpts+=3;
  1037. X          }
  1038. X          if(magic(country,MA_MONST)==TRUE) ntn[country].spellpts+=2;
  1039. X!         else if(magic(country,AV_MONST)==TRUE) ntn[country].spellpts+=1;
  1040. X!         else if((magic(country,MI_MONST)==TRUE)
  1041. X              &&( rand()%2==0)) ntn[country].spellpts+=1;
  1042. X      }
  1043. X      free(attr);
  1044. X--- 709,716 ----
  1045. X                  ntn[country].spellpts+=3;
  1046. X          }
  1047. X          if(magic(country,MA_MONST)==TRUE) ntn[country].spellpts+=2;
  1048. X!         if(magic(country,AV_MONST)==TRUE) ntn[country].spellpts+=1;
  1049. X!         if((magic(country,MI_MONST)==TRUE)
  1050. X              &&( rand()%2==0)) ntn[country].spellpts+=1;
  1051. X      }
  1052. X      free(attr);
  1053. X***************
  1054. X*** 1212,1221 ****
  1055. X              &&( A->stat<NUMSTATUS ))
  1056. X                  A->stat=FLIGHT;
  1057. X  
  1058. X!             if((magic(country,ROADS)==1)
  1059. X              &&(sct[AX][AY].owner!=country)){
  1060. X                  if(A->smove>7) A->smove-=4;
  1061. X!                 else A->smove=4;
  1062. X              }
  1063. X  
  1064. X              if((magic(country,SAPPER)==1)
  1065. X--- 1222,1231 ----
  1066. X              &&( A->stat<NUMSTATUS ))
  1067. X                  A->stat=FLIGHT;
  1068. X  
  1069. X!             if((magic(country,ROADS)==TRUE)
  1070. X              &&(sct[AX][AY].owner!=country)){
  1071. X                  if(A->smove>7) A->smove-=4;
  1072. X!                 else if (A->smove>4) A->smove=4;
  1073. X              }
  1074. X  
  1075. X              if((magic(country,SAPPER)==1)
  1076. X***************
  1077. X*** 1411,1417 ****
  1078. X          tempflt = (float) curntn->tfood * (100-curntn->spoilrate);
  1079. X          curntn->tfood = (long) (tempflt / 100.0);
  1080. X  
  1081. X!         if(curntn->tgold > GOLDTHRESH*curntn->jewels){
  1082. X              /* buy jewels off commodities board */
  1083. X              xx=curntn->tgold-GOLDTHRESH*curntn->jewels;
  1084. X              if (ispc(curntn->active)) {
  1085. X--- 1421,1427 ----
  1086. X          tempflt = (float) curntn->tfood * (100-curntn->spoilrate);
  1087. X          curntn->tfood = (long) (tempflt / 100.0);
  1088. X  
  1089. X!         if((0.0+curntn->tgold) - GOLDTHRESH*(0.0+curntn->jewels) > 0.0){
  1090. X              /* buy jewels off commodities board */
  1091. X              xx=curntn->tgold-GOLDTHRESH*curntn->jewels;
  1092. X              if (ispc(curntn->active)) {
  1093. X***************
  1094. X*** 1419,1429 ****
  1095. X                      fprintf(fm,"Message from Conquer\n\n");
  1096. X                      fprintf(fm,"Gold imbalance forced your treasury to purchase\n");
  1097. X                      fprintf(fm,"%ld jewels for %ld gold talons to compensate.\n",
  1098. X!                         xx/GODPRICE*GODJEWL,xx);
  1099. X                      mailclose(country);
  1100. X                  }
  1101. X              }
  1102. X!             curntn->jewels += (xx/GODPRICE*GODJEWL);
  1103. X              curntn->tgold  -= xx;
  1104. X          }
  1105. X  
  1106. X--- 1429,1440 ----
  1107. X                      fprintf(fm,"Message from Conquer\n\n");
  1108. X                      fprintf(fm,"Gold imbalance forced your treasury to purchase\n");
  1109. X                      fprintf(fm,"%ld jewels for %ld gold talons to compensate.\n",
  1110. X!                         dtol((double)xx*GODJEWL/GODPRICE)
  1111. X!                         ,xx);
  1112. X                      mailclose(country);
  1113. X                  }
  1114. X              }
  1115. X!             curntn->jewels += dtol((double)xx*GODJEWL/GODPRICE);
  1116. X              curntn->tgold  -= xx;
  1117. X          }
  1118. X  
  1119. X*** ocommands.c    Sat Mar  3 15:27:39 1990
  1120. X--- commands.c    Sat Mar  3 15:28:00 1990
  1121. X***************
  1122. X*** 189,195 ****
  1123. X              mvaddstr(LINES-3,7,"What nation owner:");
  1124. X              refresh();
  1125. X              x = get_country();
  1126. X!             if (x<NTOTAL) sptr->owner=x;
  1127. X              reset_god();
  1128. X              return;
  1129. X          case 'p':
  1130. X--- 189,195 ----
  1131. X              mvaddstr(LINES-3,7,"What nation owner:");
  1132. X              refresh();
  1133. X              x = get_country();
  1134. X!             if (x>0 && x<NTOTAL) sptr->owner=x;
  1135. X              reset_god();
  1136. X              return;
  1137. X          case 'p':
  1138. X***************
  1139. X*** 200,206 ****
  1140. X              }
  1141. X              mvaddstr(LINES-3,7,"new population for sector: ");
  1142. X              refresh();
  1143. X!             sptr->people = (long) get_number();
  1144. X              reset_god();
  1145. X              return;
  1146. X          case 't':
  1147. X--- 200,208 ----
  1148. X              }
  1149. X              mvaddstr(LINES-3,7,"new population for sector: ");
  1150. X              refresh();
  1151. X!             metal = get_number();
  1152. X!             if (metal <= (-1)) return;
  1153. X!             sptr->people = metal;
  1154. X              reset_god();
  1155. X              return;
  1156. X          case 't':
  1157. X***************
  1158. X*** 222,228 ****
  1159. X                  mvaddstr(LINES-1,7,"new sector value: ");
  1160. X                  refresh();
  1161. X                  x = get_number();
  1162. X!                 if(x<100 && x>=0)
  1163. X                  if(y>END_MINE) {
  1164. X                      sptr->jewels = (char)x;
  1165. X                      sptr->metal = 0;
  1166. X--- 224,230 ----
  1167. X                  mvaddstr(LINES-1,7,"new sector value: ");
  1168. X                  refresh();
  1169. X                  x = get_number();
  1170. X!                 if(x<100 && x>0) {
  1171. X                  if(y>END_MINE) {
  1172. X                      sptr->jewels = (char)x;
  1173. X                      sptr->metal = 0;
  1174. X***************
  1175. X*** 230,235 ****
  1176. X--- 232,241 ----
  1177. X                      sptr->metal  = (char)x;
  1178. X                      sptr->jewels = 0;
  1179. X                  }
  1180. X+                 } else {
  1181. X+                     sptr->jewels = 0;
  1182. X+                     sptr->metal = 0;
  1183. X+                 }
  1184. X              } else {
  1185. X                  sptr->jewels=0;
  1186. X                  sptr->metal=0;
  1187. X***************
  1188. X*** 1119,1126 ****
  1189. X              if(strncmp(line,"END",3)==0) contd=TRUE;
  1190. X          }
  1191. X          standout();
  1192. X!         mvaddstr(LINES-3,(COLS/2)-22,"HIT ANY KEY TO CONTINUE");
  1193. X!         mvaddstr(LINES-2,(COLS/2)-22,"HIT RETURN TO DELETE MESSAGE");
  1194. X          standend();
  1195. X          refresh();
  1196. X          inpch=getch();
  1197. X--- 1125,1132 ----
  1198. X              if(strncmp(line,"END",3)==0) contd=TRUE;
  1199. X          }
  1200. X          standout();
  1201. X!         mvaddstr(LINES-3,(COLS/2)-13,"HIT ANY KEY TO CONTINUE");
  1202. X!         mvaddstr(LINES-2,(COLS/2)-16,"HIT RETURN TO DELETE MESSAGE");
  1203. X          standend();
  1204. X          refresh();
  1205. X          inpch=getch();
  1206. X*** odata.c    Sat Mar  3 15:27:39 1990
  1207. X--- data.c    Sat Mar  3 15:28:01 1990
  1208. X***************
  1209. X*** 93,99 ****
  1210. X  100,50,100,50,250,125,
  1211. X  250,50,500,100,250,125,
  1212. X  50, 50, 50, 75, 75,
  1213. X! 100, 50, 150, 150, 150,
  1214. X  175, 150, 500, 500, 1000
  1215. X  };
  1216. X  
  1217. X--- 93,99 ----
  1218. X  100,50,100,50,250,125,
  1219. X  250,50,500,100,250,125,
  1220. X  50, 50, 50, 75, 75,
  1221. X! 75, 50, 150, 150, 150,
  1222. X  175, 150, 500, 500, 1000
  1223. X  };
  1224. X  
  1225. X***************
  1226. X*** 262,268 ****
  1227. X  /*              0         0         0         0         0         0 */
  1228. X  /* a value of x means any designation is possible */
  1229. X  /*              fwbcwmhpgcfshfrwdpbcpstgponpmldpllpiopshmtpbcltismasspdsgridp*/
  1230. X! char *tg_stype="xffffttttffffffffffftxlxllttuuctcccfffxxtccmmmmmmmm$$$$$$$$$$0";
  1231. X  char *tg_value="13335157911433442331131135734567789123937571111111111111111110";
  1232. X  
  1233. X  char    *tg_name[] = {
  1234. X--- 262,268 ----
  1235. X  /*              0         0         0         0         0         0 */
  1236. X  /* a value of x means any designation is possible */
  1237. X  /*              fwbcwmhpgcfshfrwdpbcpstgponpmldpllpiopshmtpbcltismasspdsgridp*/
  1238. X! char *tg_stype="xffffttttffffffffffftxlxllttuuctcccfff?xtccmmmmmmmm$$$$$$$$$$0";
  1239. X  char *tg_value="13335157911433442331131135734567789123937571111111111111111110";
  1240. X  
  1241. X  char    *tg_name[] = {
  1242. X*** omagic.c    Sat Mar  3 15:27:40 1990
  1243. X--- magic.c    Sat Mar  3 15:28:01 1990
  1244. X***************
  1245. X*** 628,636 ****
  1246. X              }
  1247. X          } else {
  1248. X              if (ntn[i].race==ORC) 
  1249. X!                 mvaddstr((*count)++,0,"  Wrong Race");
  1250. X!             else mvaddstr((*count)++,0,"  That Nation is Outside Your Influence");
  1251. X          }
  1252. X      }
  1253. X      return(done);
  1254. X  }
  1255. X--- 628,638 ----
  1256. X              }
  1257. X          } else {
  1258. X              if (ntn[i].race==ORC) 
  1259. X!                 mvaddstr((*count)++,0,"  That Nation is Outside Your Influence");
  1260. X!             else mvaddstr((*count)++,0,"  Wrong Race");
  1261. X          }
  1262. X+         refresh();
  1263. X+         sleep(2);
  1264. X      }
  1265. X      return(done);
  1266. X  }
  1267. X*** omain.c    Sat Mar  3 15:27:41 1990
  1268. X--- main.c    Sat Mar  3 15:28:02 1990
  1269. X***************
  1270. X*** 61,67 ****
  1271. X      int geteuid(), getuid(), setuid();
  1272. X      register int i,j;
  1273. X      char name[NAMELTH+1],filename[FILELTH];
  1274. X!     void srand(),init_hasseen(),mapprep();
  1275. X      int getopt();
  1276. X      char passwd[PASSLTH+1];
  1277. X      long time();
  1278. X--- 61,70 ----
  1279. X      int geteuid(), getuid(), setuid();
  1280. X      register int i,j;
  1281. X      char name[NAMELTH+1],filename[FILELTH];
  1282. X! #ifdef __STDC__
  1283. X!     void srand();
  1284. X! #endif
  1285. X!     void init_hasseen(),mapprep();
  1286. X      int getopt();
  1287. X      char passwd[PASSLTH+1];
  1288. X      long time();
  1289. X***************
  1290. X*** 1119,1125 ****
  1291. X                      mvprintw(nfound2*2+count,COLS-20,"%s: %d men  ",ntn[i].name,enemy);
  1292. X                  else if(magic(i,THE_VOID)==TRUE)
  1293. X                  mvprintw(nfound2*2+count,COLS-20,"%s: ?? men  ",ntn[i].name);
  1294. X!                 else mvprintw(nfound2*2+count,COLS-20,"%s: %ld men  ",ntn[i].name,(enemy*(rand()%60+70)/100));
  1295. X                  count++;
  1296. X              }
  1297. X              enemy=0;
  1298. X--- 1122,1132 ----
  1299. X                      mvprintw(nfound2*2+count,COLS-20,"%s: %d men  ",ntn[i].name,enemy);
  1300. X                  else if(magic(i,THE_VOID)==TRUE)
  1301. X                  mvprintw(nfound2*2+count,COLS-20,"%s: ?? men  ",ntn[i].name);
  1302. X!                 else {
  1303. X!                     srand(i*17+enemy+TURN*3);
  1304. X!                     mvprintw(nfound2*2+count,COLS-20,"%s: %ld men  ",ntn[i].name,(enemy*(rand()%60+70)/100));
  1305. X!                     srand((unsigned) time((long *) 0));
  1306. X!                 }
  1307. X                  count++;
  1308. X              }
  1309. X              enemy=0;
  1310. X***************
  1311. X*** 1137,1143 ****
  1312. X                      mvprintw(nfound2*2+count,COLS-20,"%s: %d ships",ntn[i].name,enemy);
  1313. X                  else if(magic(i,THE_VOID)==TRUE)
  1314. X                  mvprintw(nfound2*2+count,COLS-20,"%s: ?? ships",ntn[i].name);
  1315. X!                 else mvprintw(nfound2*2+count,COLS-20,"%s: %ld ships",ntn[i].name,(enemy*(rand()%60+70)/100));
  1316. X                  count++;
  1317. X              }
  1318. X          }
  1319. X--- 1144,1154 ----
  1320. X                      mvprintw(nfound2*2+count,COLS-20,"%s: %d ships",ntn[i].name,enemy);
  1321. X                  else if(magic(i,THE_VOID)==TRUE)
  1322. X                  mvprintw(nfound2*2+count,COLS-20,"%s: ?? ships",ntn[i].name);
  1323. X!                 else {
  1324. X!                     srand(i*17+enemy+TURN*3);
  1325. X!                     mvprintw(nfound2*2+count,COLS-20,"%s: %ld ships",ntn[i].name,(enemy*(rand()%60+70)/100));
  1326. X!                     srand((unsigned) time((long *) 0));
  1327. X!                 }
  1328. X                  count++;
  1329. X              }
  1330. X          }
  1331. X***************
  1332. X*** 1177,1184 ****
  1333. X  
  1334. X          if((sptr->owner==country)||(country==0)||(magic(country,NINJA)==TRUE))
  1335. X          mvprintw(LINES-9,COLS-20,"people: %6d",sptr->people);
  1336. X!         else
  1337. X!         mvprintw(LINES-9,COLS-20,"people: %6d",sptr->people*(rand()%60+70)/100);
  1338. X          clrtoeol();
  1339. X          if((sptr->owner==country)
  1340. X          ||(sptr->owner==0)
  1341. X--- 1188,1198 ----
  1342. X  
  1343. X          if((sptr->owner==country)||(country==0)||(magic(country,NINJA)==TRUE))
  1344. X          mvprintw(LINES-9,COLS-20,"people: %6d",sptr->people);
  1345. X!         else {
  1346. X!             srand(country*17+TURN*3+sptr->people);
  1347. X!             mvprintw(LINES-9,COLS-20,"people: %6d",sptr->people*(rand()%60+70)/100);
  1348. X!             srand((unsigned) time((long *) 0));
  1349. X!         }
  1350. X          clrtoeol();
  1351. X          if((sptr->owner==country)
  1352. X          ||(sptr->owner==0)
  1353. X*** onpc.c    Sat Mar  3 15:27:42 1990
  1354. X--- npc.c    Sat Mar  3 15:28:02 1990
  1355. X***************
  1356. X*** 487,493 ****
  1357. X      for(armynum=1;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1358. X          /* move army back if too far out */
  1359. X          ok = 0;
  1360. X!         if (P_ASOLD < MINLEADER && P_ASOLD!=A_MILITIA) {
  1361. X              curntn->tmil += P_ASOLD;
  1362. X          }
  1363. X          for(x=(int)P_AXLOC-3;x<=(int)P_AXLOC+3;x++)
  1364. X--- 487,493 ----
  1365. X      for(armynum=1;armynum<MAXARM;armynum++) if(P_ASOLD>0){
  1366. X          /* move army back if too far out */
  1367. X          ok = 0;
  1368. X!         if (P_ATYPE < MINLEADER && P_ASOLD!=A_MILITIA) {
  1369. X              curntn->tmil += P_ASOLD;
  1370. X          }
  1371. X          for(x=(int)P_AXLOC-3;x<=(int)P_AXLOC+3;x++)
  1372. X***************
  1373. X*** 562,567 ****
  1374. X--- 562,568 ----
  1375. X  
  1376. X      /*too few soldiers on garrison*/
  1377. X      /*diff is number to change mil in cap (>0)*/
  1378. X+     if (*(u_enmetal + (P_ATYPE%UTYPE)) > 0)
  1379. X      diff = (long) min(ideal-P_ASOLD,(int) (curntn->metals / *(u_enmetal + (P_ATYPE%UTYPE))));
  1380. X  
  1381. X      diff=(long) min((int) diff, sct[curntn->capx][curntn->capy].people/2L);
  1382. X***************
  1383. X*** 636,641 ****
  1384. X--- 637,643 ----
  1385. X      &&( P_ATYPE<MINLEADER )
  1386. X      &&( P_ASOLD < TAKESECTOR )
  1387. X      &&( curntn->tgold > 0 )
  1388. X+     &&(curntn->metals >= (TAKESECTOR+20-P_ASOLD)* *(u_enmetal + (P_ATYPE%UTYPE)))
  1389. X      &&( fort_val(&sct[P_AXLOC][P_AYLOC]) > 0)
  1390. X      &&( sct[P_AXLOC][P_AYLOC].owner == country )) {
  1391. X  #ifdef DEBUG
  1392. X***************
  1393. X*** 647,652 ****
  1394. X--- 649,655 ----
  1395. X          else curntn->tgold-=(TAKESECTOR+20-P_ASOLD)*
  1396. X              *(u_encost + (P_ATYPE%UTYPE));
  1397. X          curntn->tmil += TAKESECTOR+20-P_ASOLD;
  1398. X+         curntn->metals -= ((TAKESECTOR+20-P_ASOLD)* *(u_enmetal + (P_ATYPE%UTYPE)));
  1399. X          P_ASOLD = TAKESECTOR+20;
  1400. X      }
  1401. X  
  1402. X***************
  1403. X*** 1160,1165 ****
  1404. X--- 1163,1177 ----
  1405. X  
  1406. X      if( curntn->tgold > curntn->tciv ) curntn->charity=10;
  1407. X      else curntn->charity=0;
  1408. X+     if( (curntn->tsctrs < 20) || (curntn->score < 20) ) {
  1409. X+         if( curntn->tax_rate < 10 )
  1410. X+             curntn->tax_rate = 10;
  1411. X+     } else {
  1412. X+         curntn->tax_rate = (int)min((int)(curntn->prestige/5),(int)((curntn->popularity+curntn->terror+3*curntn->charity)/10));
  1413. X+         curntn->tax_rate = (int)min(curntn->tax_rate,20);
  1414. X+         if(curntn->tax_rate < 4)
  1415. X+             curntn->tax_rate = 4;
  1416. X+     }
  1417. X  
  1418. X      /* INTELLIGENT SECTOR REDESIGNATION */
  1419. X      /* note that only redesignate pc's if not designated yet */
  1420. X*** otrade.c    Sat Mar  3 15:27:44 1990
  1421. X--- trade.c    Sat Mar  3 15:28:03 1990
  1422. X***************
  1423. X*** 51,57 ****
  1424. X  #ifdef ADMIN
  1425. X  char *tradefail[NUMPRODUCTS] = { "lack of gold", "lack of food",
  1426. X      "lack of metal", "lack of jewels", "land not owned",
  1427. X!     "no available armies", "no available navies"};
  1428. X  #endif ADMIN
  1429. X  #ifdef CONQUER
  1430. X  /* Use this when you wish to bid something */
  1431. X--- 51,58 ----
  1432. X  #ifdef ADMIN
  1433. X  char *tradefail[NUMPRODUCTS] = { "lack of gold", "lack of food",
  1434. X      "lack of metal", "lack of jewels", "land not owned",
  1435. X!     "unavailable or destroyed armies",
  1436. X!     "unavailable or destoryed navies"};
  1437. X  #endif ADMIN
  1438. X  #ifdef CONQUER
  1439. X  /* Use this when you wish to bid something */
  1440. X***************
  1441. X*** 145,151 ****
  1442. X                      lvar2[holdint],
  1443. X                      commodities[type2[holdint]]);
  1444. X                  }
  1445. X!                 if (count>16) {
  1446. X                      standout();
  1447. X                      mvaddstr(LINES-2,30,"Hit Any Key to Continue");
  1448. X                      standend();
  1449. X--- 146,152 ----
  1450. X                      lvar2[holdint],
  1451. X                      commodities[type2[holdint]]);
  1452. X                  }
  1453. X!                 if (count>LINES-8) {
  1454. X                      standout();
  1455. X                      mvaddstr(LINES-2,30,"Hit Any Key to Continue");
  1456. X                      standend();
  1457. X***************
  1458. X*** 571,576 ****
  1459. X--- 572,578 ----
  1460. X          }
  1461. X      }
  1462. X      mvprintw((*count)++,0," JUST ENTERED %c so food value is %d", entered,temp);
  1463. X+     refresh();
  1464. X      return(temp);
  1465. X  }
  1466. X  
  1467. X***************
  1468. X*** 659,664 ****
  1469. X--- 661,667 ----
  1470. X  int cntry,item,isup,extint;
  1471. X  long longval;
  1472. X  {
  1473. X+     if (cntry == -1) return;
  1474. X      switch(item)
  1475. X      {
  1476. X      case TDGOLD:
  1477. X***************
  1478. X*** 722,727 ****
  1479. X--- 725,731 ----
  1480. X      case TDARMY:
  1481. X          /* find army number for cntry2 */
  1482. X          /* give army to cntry2 */
  1483. X+         if(ntn[cntry1].arm[extra].sold <= 0) return -1;
  1484. X          while(unitnum==(-1)&&unitcount<MAXARM) {
  1485. X              if (ntn[cntry2].arm[unitcount].sold<=0) {
  1486. X                  /* give army to cntry2 */
  1487. X***************
  1488. X*** 743,748 ****
  1489. X--- 747,755 ----
  1490. X          break;
  1491. X      case TDSHIP:
  1492. X          /* give navy to cntry1 */
  1493. X+         if(!(ntn[cntry1].nvy[extra].merchant!=0
  1494. X+            && ntn[cntry1].nvy[extra].warships!=0
  1495. X+            && ntn[cntry1].nvy[extra].galleys!=0) ) return -1;
  1496. X          while(unitnum==(-1)&&unitcount<MAXARM){
  1497. X              if ((int)ntn[cntry2].nvy[unitcount].merchant+ntn[cntry2].nvy[unitcount].warships+ntn[cntry2].nvy[unitcount].galleys == 0) {
  1498. X                  /* give navy to cntry2 */
  1499. X***************
  1500. X*** 787,793 ****
  1501. X          returnval=longval;
  1502. X          break;
  1503. X      case TDLAND:
  1504. X!         if (cntry2!=sct[(int)longval][extint].owner)
  1505. X          returnval=(long)tofood( &sct[(int)longval][extint],cntry1);
  1506. X          break;
  1507. X      case TDARMY:
  1508. X--- 794,800 ----
  1509. X          returnval=longval;
  1510. X          break;
  1511. X      case TDLAND:
  1512. X!         if (cntry2 == sct[(int)longval][extint].owner)
  1513. X          returnval=(long)tofood( &sct[(int)longval][extint],cntry1);
  1514. X          break;
  1515. X      case TDARMY:
  1516. X***************
  1517. X*** 795,800 ****
  1518. X--- 802,808 ----
  1519. X          returnval=armyvalue(cntry2,extint);
  1520. X          break;
  1521. X      case TDSHIP:
  1522. X+         curntn = &ntn[cntry2];
  1523. X          if (flthold(extint)>0)
  1524. X          returnval = (long)flthold(extint);
  1525. X          break;
  1526. X***************
  1527. X*** 976,982 ****
  1528. X                  whobuy[type1[itemnum]]=natn[itemnum];
  1529. X              } else {
  1530. X                  /* return bid */
  1531. X!                 takeback(whobuy[itemnum],
  1532. X                      type2[type1[itemnum]],
  1533. X                      lvar1[itemnum],(int)lvar2[itemnum],FALSE);
  1534. X              }
  1535. X--- 984,990 ----
  1536. X                  whobuy[type1[itemnum]]=natn[itemnum];
  1537. X              } else {
  1538. X                  /* return bid */
  1539. X!                 takeback(natn[itemnum],
  1540. X                      type2[type1[itemnum]],
  1541. X                      lvar1[itemnum],(int)lvar2[itemnum],FALSE);
  1542. X              }
  1543. X***************
  1544. X*** 995,1000 ****
  1545. X--- 1003,1009 ----
  1546. X      for (count=0;count<itemnum;count++) {
  1547. X          if (deal[count]==SELL) {
  1548. X              /* adjust the displayed value */
  1549. X+             if (type1[count] != TDLAND)
  1550. X              lvar1[count]=gettval(0,natn[count],type1[count],lvar1[count],extra[count]);
  1551. X              /* keep unsold items up for sale */
  1552. X              if(lvar1[count]>=0) fprintf(tfile,"%d %d %d %d %ld %ld %d\n", deal[count], natn[count],type1[count],type2[count],lvar1[count],lvar2[count],extra[count]);
  1553. X***************
  1554. X*** 1013,1018 ****
  1555. X--- 1022,1029 ----
  1556. X                      ntn[whobuy[count]].name,ntn[natn[count]].name,tradefail[type2[count]]);
  1557. X                  /* place it on the list for next turn */
  1558. X                  /* adjust the displayed value */
  1559. X+                 /* let land fail during trade */
  1560. X+                 if (type1[count] != TDLAND)
  1561. X                  lvar1[count]=gettval(0,natn[count],type1[count],lvar1[count],extra[count]);
  1562. X                  if(lvar1[count]>=0) fprintf(tfile,"%d %d %d %d %ld %ld %d\n", SELL, natn[count],type1[count],type2[count],lvar1[count],lvar2[count],extra[count]);
  1563. X              } else {
  1564. X***************
  1565. X*** 1026,1031 ****
  1566. X--- 1037,1108 ----
  1567. X          }
  1568. X      }
  1569. X      fclose(tfile);
  1570. X+ }
  1571. X+ 
  1572. X+ /* remove a nations items from the trading board */
  1573. X+ void 
  1574. X+ fixtrade (cntry)
  1575. X+ int cntry;
  1576. X+ {
  1577. X+     FILE *tfile;
  1578. X+     int holdint, notopen=FALSE;
  1579. X+     int type1[MAXITM], type2[MAXITM], deal[MAXITM], extra[MAXITM];
  1580. X+     int natn[MAXITM], itemnum, getland(), gettrade(), checkland();
  1581. X+     long lvar1[MAXITM], lvar2[MAXITM], armyvalue();
  1582. X+     void  setaside(), takeback();
  1583. X+ 
  1584. X+     /* open trading file */
  1585. X+     if ((tfile=fopen(tradefile,"r")) == NULL ) {
  1586. X+         notopen=TRUE;
  1587. X+     }
  1588. X+     itemnum = 0;
  1589. X+ 
  1590. X+     /* read in all of the data */
  1591. X+     while (notopen==FALSE && !feof(tfile)) 
  1592. X+     {
  1593. X+         if (fscanf(tfile,"%d %d %d %d %ld %ld %d\n",&deal[itemnum],
  1594. X+             &natn[itemnum],&type1[itemnum],&type2[itemnum],
  1595. X+             &lvar1[itemnum],&lvar2[itemnum],&extra[itemnum]) == 7){
  1596. X+             if (deal[itemnum]==NOSALE) {
  1597. X+                 /* remove item from sales list */
  1598. X+                 deal[type1[itemnum]]=NOSALE;
  1599. X+             } else if (deal[itemnum]==SELL) {
  1600. X+                 itemnum++;
  1601. X+             }
  1602. X+         }
  1603. X+     }
  1604. X+     if (notopen==FALSE) fclose(tfile);
  1605. X+ 
  1606. X+     /* go through list of commodities */
  1607. X+ 
  1608. X+     for ( holdint=0; holdint<itemnum; holdint++) 
  1609. X+     {
  1610. X+         if ( deal[holdint]==SELL ) 
  1611. X+         {
  1612. X+ 
  1613. X+             if ( natn[holdint] == cntry )
  1614. X+             {
  1615. X+                 /* remove it from market */
  1616. X+ 
  1617. X+                 if ( (tfile = fopen(tradefile,"a+"))==NULL)
  1618. X+                 {
  1619. X+                     printf("Error opening file for trading");
  1620. X+                     abrt();
  1621. X+                 }
  1622. X+ 
  1623. X+                 fprintf(tfile, "%d %d %d %d %ld %ld %d\n", 
  1624. X+                  NOSALE, natn[holdint], holdint, 0, 0L, 0L, 0);
  1625. X+ 
  1626. X+                 fclose(tfile);
  1627. X+ 
  1628. X+                 takeback( natn[holdint], type1[holdint], lvar1[holdint],
  1629. X+                     extra[holdint], FALSE);
  1630. X+ 
  1631. X+             }  /* natn == cntry */
  1632. X+ 
  1633. X+         } /* SELL order */
  1634. X+ 
  1635. X+     } /* loop through commodities */
  1636. X  }
  1637. X  #endif ADMIN
  1638. X  #endif TRADE
  1639. X*** ocheck.c    Sat Mar  3 15:27:39 1990
  1640. X--- check.c    Sat Mar  3 15:28:03 1990
  1641. X***************
  1642. X*** 18,29 ****
  1643. X      register struct s_nation    *nptr;
  1644. X      register int    i;
  1645. X      register int    country;
  1646. X      struct army    *a;
  1647. X  
  1648. X      for( country = 0; country < NTOTAL; country++ ) {
  1649. X          nptr = &ntn[country];
  1650. X  
  1651. X!         if(nptr->active == 0) continue;
  1652. X          if( nptr->metals < 0.0 ) {
  1653. X              fprintf( stderr, "file %s: line %d: nation[%d] metal = %ld\n",
  1654. X                  __file__, __line__, country, nptr->metals );
  1655. X--- 18,30 ----
  1656. X      register struct s_nation    *nptr;
  1657. X      register int    i;
  1658. X      register int    country;
  1659. X+     int j, k;
  1660. X      struct army    *a;
  1661. X  
  1662. X      for( country = 0; country < NTOTAL; country++ ) {
  1663. X          nptr = &ntn[country];
  1664. X  
  1665. X!         if(country !=0 && nptr->active == 0) continue;
  1666. X          if( nptr->metals < 0.0 ) {
  1667. X              fprintf( stderr, "file %s: line %d: nation[%d] metal = %ld\n",
  1668. X                  __file__, __line__, country, nptr->metals );
  1669. X***************
  1670. X*** 54,68 ****
  1671. X                      __file__, __line__, country, i, a->yloc );
  1672. X                  a->yloc = 0;
  1673. X              }
  1674. X              if( a->stat != ONBOARD && sct[a->xloc][a->yloc].altitude==WATER ) {
  1675. X                  fprintf( stderr, "file %s: line %d: nation[%d] army[%d] loc=%d,%d (water) men=%d\n",
  1676. X                  __file__,__line__,country,i,a->xloc,a->yloc,a->sold);
  1677. X                  a->sold = 0;
  1678. X              }
  1679. X!             if( a->stat == ONBOARD && a->smove != 0) {
  1680. X!                 /* don't echo since this is still getting */
  1681. X!                 /* set some place someplace I can't find yet */
  1682. X!                 a->smove = 0;
  1683. X              }
  1684. X          } /* for */
  1685. X  
  1686. X--- 55,101 ----
  1687. X                      __file__, __line__, country, i, a->yloc );
  1688. X                  a->yloc = 0;
  1689. X              }
  1690. X+             if( a->stat == ONBOARD) {
  1691. X+                 if (a->smove != 0) {
  1692. X+                     fprintf( stderr, "file %s: line %d: nation[%d] army[%d] onboard move = %d\n",
  1693. X+                         __file__, __line__, country, i, a->smove );
  1694. X+                     a->smove = 0;
  1695. X+                 }
  1696. X+                 k = 0;
  1697. X+                 for (j = 0; j < MAXNAVY; j++) {
  1698. X+                     if (nptr->nvy[j].warships == 0
  1699. X+                       && nptr->nvy[j].merchant == 0
  1700. X+                       && nptr->nvy[j].galleys == 0)
  1701. X+                         continue;
  1702. X+                     if (nptr->nvy[j].armynum == i) {
  1703. X+                         k = 1;
  1704. X+                     }
  1705. X+                 }
  1706. X+                 if (k == 0) {
  1707. X+                     fprintf(stderr, "files %s: line %d: nation[%d] army[%d] onboard nothing\n",
  1708. X+                         __file__,__line__,country,i);
  1709. X+                     a->stat = DEFEND;
  1710. X+                 }
  1711. X+             }
  1712. X              if( a->stat != ONBOARD && sct[a->xloc][a->yloc].altitude==WATER ) {
  1713. X                  fprintf( stderr, "file %s: line %d: nation[%d] army[%d] loc=%d,%d (water) men=%d\n",
  1714. X                  __file__,__line__,country,i,a->xloc,a->yloc,a->sold);
  1715. X                  a->sold = 0;
  1716. X              }
  1717. X!         } /* for */
  1718. X! 
  1719. X!         for( i = 0; i < MAXNAVY; i++ ) {
  1720. X!             if (nptr->nvy[i].warships == 0
  1721. X!               && nptr->nvy[i].merchant == 0
  1722. X!               && nptr->nvy[i].galleys == 0)
  1723. X!                 continue;
  1724. X!             if (nptr->nvy[i].armynum != MAXARM) {
  1725. X!                 a = &(nptr->arm[nptr->nvy[i].armynum]);
  1726. X!                 if (a->sold == 0 || a->stat != ONBOARD) {
  1727. X!                     fprintf(stderr, "file %s: line %d: nation[%d] navy[%d] carrying invalid troop\n",
  1728. X!                            __file__,__line__,country,i);
  1729. X!                     nptr->nvy[i].armynum = MAXARM;
  1730. X!                 }
  1731. X              }
  1732. X          } /* for */
  1733. X  
  1734. X*** onavy.c    Sat Mar  3 15:27:42 1990
  1735. X--- navy.c    Sat Mar  3 15:28:03 1990
  1736. X***************
  1737. X*** 423,430 ****
  1738. X              }
  1739. X              P_ASTAT=DEFEND;
  1740. X              P_NARMY=MAXARM;
  1741. X!             if ((sct[XREAL][YREAL].designation!=DCITY
  1742. X!             && sct[XREAL][YREAL].designation!=DCAPITOL)
  1743. X              || P_NMOVE < N_CITYCOST) {
  1744. X                  P_NMOVE=0;
  1745. X              } else {
  1746. X--- 423,433 ----
  1747. X              }
  1748. X              P_ASTAT=DEFEND;
  1749. X              P_NARMY=MAXARM;
  1750. X!             if (!((sct[XREAL][YREAL].designation==DCITY
  1751. X!             || sct[XREAL][YREAL].designation==DCAPITOL)
  1752. X!             && (sct[XREAL][YREAL].owner==country
  1753. X!             || (!ntn[sct[XREAL][YREAL].owner].dstatus[country]!=UNMET
  1754. X!             && ntn[sct[XREAL][YREAL].owner].dstatus[country]<=NEUTRAL)))
  1755. X              || P_NMOVE < N_CITYCOST) {
  1756. X                  P_NMOVE=0;
  1757. X              } else {
  1758. X***************
  1759. X*** 495,502 ****
  1760. X                  P_ASTAT=ONBOARD;
  1761. X                  P_AMOVE=0;
  1762. X                  P_NARMY=armynum;
  1763. X!                 if ((sct[XREAL][YREAL].designation!=DCITY
  1764. X!                 && sct[XREAL][YREAL].designation!=DCAPITOL)
  1765. X                  || P_NMOVE < N_CITYCOST) {
  1766. X                      P_NMOVE=0;
  1767. X                  } else {
  1768. X--- 498,508 ----
  1769. X                  P_ASTAT=ONBOARD;
  1770. X                  P_AMOVE=0;
  1771. X                  P_NARMY=armynum;
  1772. X!                 if (!((sct[XREAL][YREAL].designation==DCITY
  1773. X!                 || sct[XREAL][YREAL].designation==DCAPITOL)
  1774. X!                 && (sct[XREAL][YREAL].owner==country
  1775. X!                 || (!ntn[sct[XREAL][YREAL].owner].dstatus[country]!=UNMET
  1776. X!                 && ntn[sct[XREAL][YREAL].owner].dstatus[country]<=NEUTRAL)))
  1777. X                  || P_NMOVE < N_CITYCOST) {
  1778. X                      P_NMOVE=0;
  1779. X                  } else {
  1780. X*** otxt3    Sat Mar  3 15:27:44 1990
  1781. X--- txt3    Sat Mar  3 15:28:04 1990
  1782. X***************
  1783. X*** 1,25 ****
  1784. X!                               MAGIC POWERS
  1785. X  
  1786. X! Magic powers differentiate your nation from all the other nations in the
  1787. X! world.  There are three types of powers - truly MAGICAL powers, which
  1788. X! usually involve summoning or spell use, CIVILIAN powers, which are related
  1789. X! to civilization and trade, and MILITARY powers, which measure your ability
  1790. X! to make war.  
  1791. X  
  1792. X! All nations start with at least one power (based on race or class) and can 
  1793. X! purchase additional powers by expending jewels.  On the Magic Screen ('M'), 
  1794. X! if you have enough jewels, you will be asked if you wish to buy a magic
  1795. X  power.
  1796. X!  
  1797. X! The magic screen also permits you to see what powers you have, and to
  1798. X! takeover ORC nations if you are an ORC nation with the appropriate powers.
  1799. X  END
  1800. X!                             HOW TO GET MAGIC
  1801. X  
  1802. X! Magic powers cost jewels to obtain; the chance to obtain a power is based on 
  1803. X! your nations magic ability.  The formulae for this is to take two to the 
  1804. X! power of the sum of the number of powers you have from that type and half 
  1805. X! the number of other powers times your base value:
  1806. X  
  1807. X  jewel cost for civilian power = Base * 2**( #mgk/2 + #civ + #mil/2 )
  1808. X  
  1809. X--- 1,25 ----
  1810. X!                                 MAGIC POWERS
  1811. X  
  1812. X! Magic powers differentiate your nation from all  the  other  nations  in  the
  1813. X! world.  There are three types of powers - truly MAGICAL powers, which usually
  1814. X! involve summoning or spell use, CIVILIAN powers, which are related to civili-
  1815. X! zation  and  trade,  and  MILITARY powers, which measure your ability to make
  1816. X! war.
  1817. X  
  1818. X! All nations start with at least one power (based on race or  class)  and  can
  1819. X! purchase  additional  powers by expending jewels.  On the Magic Screen ('M'),
  1820. X! if you have enough jewels, you will be asked if  you  wish  to  buy  a  magic
  1821. X  power.
  1822. X! 
  1823. X! The magic screen also permits you to see what powers you have, and  to  take-
  1824. X! over ORC nations if you are an ORC nation with the appropriate powers.
  1825. X  END
  1826. X!                               HOW TO GET MAGIC
  1827. X  
  1828. X! Magic powers cost jewels to obtain; the cost to obtain a power  is  based  on
  1829. X! your  nations  magic  ability.   The  formulae for this is to take two to the
  1830. X! power of the sum of the number of powers you have from that type and half the
  1831. X! number of other powers times your base value:
  1832. X  
  1833. X  jewel cost for civilian power = Base * 2**( #mgk/2 + #civ + #mil/2 )
  1834. X  
  1835. X***************
  1836. X*** 102,145 ****
  1837. X  Enhance Attack  -- 30% increase in attack at a cost of 1 spell pt / 300 men
  1838. X  Enhance Defense -- 30% increase in defense at a cost of 1 spell pt / 300 men
  1839. X  
  1840. X!    All of the above spells except summoning have an effect area of one army
  1841. X! unit and a duration of one turn.  Flight and the Combat Enhancements each
  1842. X! cause the unit to lose one movement point due to the change in status.
  1843. X  END
  1844. X!                         SUMMONED MONSTERS
  1845. X  
  1846. X! A monster unit represents one monster, but is the equivalent in combat of an
  1847. X  army of the given number of men.  When summoned, they appear in your Capitol,
  1848. X! and are yours to command until you disband them or can not afford to pay
  1849. X! their per/turn jewel cost *and* 5x that cost in gold.  Monsters may be
  1850. X! wounded in combat as can normal army units.  Wounded monsters have a percent
  1851. X  chance of dying based on the percent damage taken (a dragon (1000 men) taking
  1852. X! 200 equivalent men of damage has a 20% chance of dying).  Next turn, however
  1853. X! its strength will be fully restored (1000 men again).  A number of the
  1854. X! monsters will also have the ability of flight.
  1855. X  
  1856. X! Spell points can accumulate from turn to turn, but there is a 25% chance
  1857. X! that half your unused spell points disappear each turn... this gives you
  1858. X! some incentive to use them.
  1859. X  END
  1860. X                          SUMMONED MONSTER TYPES
  1861. X  
  1862. X             spell    combat                 jewels      power
  1863. X             points   bonus    move    men    turn       prerequisites
  1864. X! SPIRIT        2       +0      x1      50     1000
  1865. X! ASSASSIN      2      +20      x1      50      400      NINJA
  1866. X! EFREET        2      +10      x1.5    50      400      DERVISH
  1867. X! GARGOYLE      2      +10      x1      75      450      MI_MONST
  1868. X! WRAITH        2      +10      x1      75      450      VAMPIRE
  1869. X! HERO          2       +0      x1     100      200      WARRIOR
  1870. X! CENTAUR       2      +10      x1.5    50      200      CAVALRY
  1871. X! GIANT         5       +0      x1     150     2100
  1872. X! SUPERHERO     5      +15      x1     150      450      WARLORD
  1873. X! MUMMY         5      +15      x1     150     1000      VAMPIRE
  1874. X! ELEMENTAL     5       +5      x1.5   175     1900      SORCERER
  1875. X! MINOTAUR      5      +20      x1     150     2100      DESTROYER
  1876. X! DEMON         10     +50      x1     500     6000      DESTROYER
  1877. X! BALROG        10     +40      x1.5   500     6000      WIZARD & VAMPIRE
  1878. X! DRAGON        15     +50      x2    1000    10000      MA_MONST & WIZARD
  1879. X  END
  1880. X  DONE
  1881. X--- 102,162 ----
  1882. X  Enhance Attack  -- 30% increase in attack at a cost of 1 spell pt / 300 men
  1883. X  Enhance Defense -- 30% increase in defense at a cost of 1 spell pt / 300 men
  1884. X  
  1885. X! All of the above spells except summoning have an effect area of one army unit
  1886. X! and  a  duration  of one turn.  Flight and the Combat Enhancements each cause
  1887. X! the unit to lose one movement point due to the change in status.
  1888. X  END
  1889. X!                               SUMMONED MONSTERS
  1890. X  
  1891. X! A monster unit represents one monster, but is the equivalent in combat of  an
  1892. X  army of the given number of men.  When summoned, they appear in your Capitol,
  1893. X! and are yours to command until you disband them or  can  not  afford  to  pay
  1894. X! their  per/turn  jewel  cost  *and*  5x  that  cost in gold.  Monsters may be
  1895. X! wounded in combat as can normal army units.  Wounded monsters have a  percent
  1896. X  chance of dying based on the percent damage taken (a dragon (1000 men) taking
  1897. X! 200 equivalent men of damage has a 20% chance of dying).  Next turn,  however
  1898. X! its  strength  will be fully restored (1000 men again).  A number of the mon-
  1899. X! sters will also have the ability of flight.
  1900. X  
  1901. X! Spell points can accumulate from turn to turn, but there is a 25% chance that
  1902. X! half  your  unused  spell points disappear each turn....  This gives you some
  1903. X! incentive to use them.
  1904. X  END
  1905. X                          SUMMONED MONSTER TYPES
  1906. X  
  1907. X             spell    combat                 jewels      power
  1908. X             points   bonus    move    men    turn       prerequisites
  1909. X! Spirit        2       +0      x1      50     1000
  1910. X! Assasin       2      +20      x1      50      400      NINJA
  1911. X! Efreet        2      +10      x1.5    50      400      DERVISH
  1912. X! Gargoyl       2      +10      x1      75      450      MI_MONST
  1913. X! Wraith        2      +10      x1      75      450      VAMPIRE
  1914. X! Hero          2       +0      x1      75      200      WARLORD
  1915. X! Centaur       2      +10      x1.5    50      200      CAVALRY
  1916. X! Giant         5       +0      x1     150     2100
  1917. X! Suphero       5      +15      x1     150      450      WARRIOR
  1918. X! Mummy         5      +15      x1     150     1000      VAMPIRE
  1919. X! Elmentl       5       +5      x1.5   175     1900      SORCERER
  1920. X! Mintaur       5      +20      x1     150     2100      DESTROYER
  1921. X! Daemon        10     +50      x1     500     6000      DESTROYER
  1922. X! Balrog        10     +40      x1.5   500     6000      WIZARD & VAMPIRE
  1923. X! Dragon        15     +50      x2    1000    10000      MA_MONST & WIZARD
  1924. X! END
  1925. X!                    FURTHER RESTRICTIONS ON ACQUIRING MAGIC
  1926. X! 
  1927. X! Note: This applies only to powers acquired during the course of the game  and
  1928. X! not  to innate powers of nations.  Further, extra random powers bought by new
  1929. X! nations are considered to be bought  on  their  first  turn  as  their  first
  1930. X! action.
  1931. X! 
  1932. X! God only:              KNOWALL
  1933. X! Orc only:              MI_MONST, AV_MONST, MA_MONST, BREEDER
  1934. X! PC only:               ARMOR, AVIAN, SAPPER,
  1935. X!                        DEMOCRACY, NINJA, ROADS, SAILOR, SLAVER,
  1936. X!                        SUMMON, WYZARD, SORCEROR
  1937. X! Forbidden to Dwarves:  SUMMON, WYZARD, SORCEROR
  1938. X! Forbidden to Elves:    DESTROYER, VAMPIRE, MINER
  1939. X! Forbidden to Orcs:     RELIGION, CAVALRY
  1940. X! Forbidden to NPC's:    CAVALRY
  1941. X  END
  1942. X  DONE
  1943. X*** ospew.c    Sat Mar  3 15:27:43 1990
  1944. X--- spew.c    Sat Mar  3 15:28:05 1990
  1945. X***************
  1946. X*** 95,106 ****
  1947. X  int n;
  1948. X  FILE *fp;
  1949. X  {
  1950. X!     char *fname;
  1951. X      char main_class[20];
  1952. X      int i;
  1953. X      HowMany = n;
  1954. X  
  1955. X!     fname = DEFFILE;
  1956. X      InFile = fopen( fname, "r" );
  1957. X      if( InFile == NULL ){
  1958. X          fprintf( stderr, "Can\'t open: %s\n", fname );
  1959. X--- 95,107 ----
  1960. X  int n;
  1961. X  FILE *fp;
  1962. X  {
  1963. X!     char fname[BIGLTH];
  1964. X      char main_class[20];
  1965. X      int i;
  1966. X      HowMany = n;
  1967. X  
  1968. X!     /* read in only the rules file in defaultdir */
  1969. X!     sprintf(fname, "%s/%s", DEFAULTDIR, DEFFILE);
  1970. X      InFile = fopen( fname, "r" );
  1971. X      if( InFile == NULL ){
  1972. X          fprintf( stderr, "Can\'t open: %s\n", fname );
  1973. X
  1974. END_OF_FILE
  1975. if test 62540 -ne `wc -c <'patches09'`; then
  1976.     echo shar: \"'patches09'\" unpacked with wrong size!
  1977. fi
  1978. # end of 'patches09'
  1979. fi
  1980. echo shar: End of shell archive.
  1981. exit 0
  1982.